import java.io.IOException;

public class Homework_1_way_1 {
    public static void main(String[] args){
        try{
            System.out.println("请输入第一个整数:");
            char a = (char)System.in.read();//将字节强制转换成char
            System.in.read();//读取换行符

            System.out.println("请输入第二个整数:");//同上
            char b = (char)System.in.read();
            System.in.read();

            int numa = Character.getNumericValue(a);//char转换为int
            int numb = Character.getNumericValue(b);

            int c = numa + numb;

            System.out.print("这两个整数的和为 "+c);
        }catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
